
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/common/includes.jsp"%>

<!DOCTYPE html>
<html lang="${currentLocale}">
<head>
<title>悠儿</title>
<%@ include file="/WEB-INF/common/meta.jsp"%>
<%@ include file="/WEB-INF/common/global_res.jsp"%>
</head>
<body>
	<%@ include file="/WEB-INF/common/header.jsp" %>

	<div class="container" id="topicList">
		<div class="row">
			<div class="span9">
				<div class="row-fluid">
					<div class="span12">
						<ul class="nav nav-tabs">
						    <li class="active">
						    	<a href="${ctx}">首页</a>
						    </li>
						    <li>
						    	<a href="${ctx}">此刻</a>
						    </li>
						 </ul>
						<c:forEach var="contentListView" items="${contentList}" varStatus="status">
			                <div class="home-topic-list row-fluid">
			                	<div class="span2">
			                		<br/>
			                		<br/>
			                		<button class="btn btn-mini" type="button" id="likeBtn">Mini button</button>
			                	</div>
			                	<div class="span10" style="width:520px;">
				                	<div class="row-fluid">
					                	<c:choose>
					                		<c:when test="${contentListView.typeId == 0}">
						                		<h4 class="home-title-h4">
								                	<a href="/article/${contentListView.id}">${contentListView.title}</a>
								                	<br/>
								                	<span class="home-topic-info"><a href="/u/${contentListView.website}">${contentListView.username}</a> &nbsp; ${contentListView.updDt}</span>
								                	<span class="home-topic-info pull-right">${contentListView.looks} / ${contentListView.likes} / ${contentListView.replies}</span>
							                	</h4>
					                			<div class="span12">
					                				<p>
					                					${contentListView.textS}
					                				</p>
					                			</div>
					                		</c:when>
					                		<c:when test="${contentListView.typeId == 1}">
					                			<h4 class="home-title-h4">
								                	<a href="/pictext/${contentListView.id}">${contentListView.title}</a>
								                	<br/>
								                	<span class="home-topic-info"><a href="/u/${contentListView.website}">${contentListView.username}</a> &nbsp; ${contentListView.updDt}</span>
								                	<span class="home-topic-info pull-right">${contentListView.looks} / ${contentListView.likes} / ${contentListView.replies}</span>
							                	</h4>
					                			<div class="span12 pic">
							                		<a href="/pictext/${contentListView.id}" target="_blank">
											            <c:choose>
											            	<c:when test="${contentListView.picIdsCount == 1}">
											            		<c:forEach var="picId" items="${contentListView.picIds}" varStatus="status">
													            	<c:url var="imgUrl" value="/img/picitem/n/${picId}.jpg" />
													            	<span class="pic-${status.index+1}"><img src="${imgUrl}" alt="title"><i></i></span>
													            </c:forEach>
											            	</c:when>
											            	<c:when test="${contentListView.picIdsCount == 3}">
											            		<c:forEach var="picId" items="${contentListView.picIds}" varStatus="status">
													            	<c:url var="imgUrl" value="/img/picitem/n/${picId}.jpg" />
													            	<span class="pic${status.index+1}"><img src="${imgUrl}" alt="title"><i></i></span>
													            </c:forEach>
											            	</c:when>
											            	<c:otherwise></c:otherwise>
											            </c:choose>
											        </a>
							                	</div>
					                		</c:when>
					                	</c:choose>
					                	
				                	</div>
			                	</div>
			                </div>
			                <div class="line_dashed"></div>
						</c:forEach>
						<section id="pageBar">
							${pageBar}	
						</section>
					</div>
				</div>
			</div>
			
			<div class="span3 rightbox">
				<div class="row-fluid">
					<div class="span12">
						
					</div>
				</div>
			</div>
			
		</div>

	</div>

	<%@ include file="/WEB-INF/common/footer.jsp"%>

</body>
<script type="text/javascript">
	$(function() {
		$("#likeBtn").click(function(){
			
		});
	});
</script>
</html>